package com.dc.commons.viewresolver;

import java.util.Locale;

import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;

import com.dc.commons.json.DcObjectMapper;
import com.dc.commons.views.JsonView;

public class JsonViewResolver implements ViewResolver{

    @Override
    public View resolveViewName(String viewName, Locale locale)
            throws Exception {
    	JsonView view = new JsonView();
    	view.setObjectMapper(new DcObjectMapper());
        view.setPrettyPrint(true);
        //view.setExcludeKeys(Sets.newHashSet(DcModelHelper.EXCEL_HELPER,DcModelHelper.PDF_HELPER));;
        return view;
    }

}